<?php/*  PHP version 5  Copyright (c) 2002-2019ECISP.CN、EarcLink.COM  警告：这不是一个免费的软件，请在许可范围内使用，请尊重知识产权，侵权必究，举报有奖  作者：黄祥云 E-mail:6326420@qq.com  QQ:6326420 TEL:18665655030 / 13797552220*/



namespace admin_application\link;

class MenuLink {

	public static function getLink($linkcode = false, $array = array()) {

		$action = null;

		$action_key = array();
		switch ($linkcode) {

			case 'menu':
				$action = 'MainCenter/MainPage';
				$action_key['act'] = $action;
				$action_key['app'] = $array['menu_dirname'] . '/' . $array['menu_classname'] . '/' . $array['menu_module'];
				break;

			case 'tablink':
				$action_key['act'] = $array[1] . '/' . $array[2];
				break;

			case 'lng':
				$action = 'MainCenter/MainPage';
				$action_key['act'] = $action;
				$action_key['app'] = $array['app'];
				$action_key['lng'] = $array['lng'];
				break;

			case 'link':
				$action = 'MainCenter/MainPage';
				$action_key['act'] = $action;
				$action_key['app'] = $array['widget_link'];
				break;

			case 'ajaxlink':
				$action_key['act'] = $array['widget_list'];
				break;

			case 'btlink':
				$action = 'MainCenter/MainPage';
				$action_key['act'] = $action;
				$action_key['app'] = $array['widget_bt_link'];
				break;
		}
		return linkOut($action_key);
	}

}
